import request from '@/utils/request'

// 查询卖手列表
export function listCollege(query) {
  return request({
    url: '/work/userseller/list',
    method: 'get',
    params: query
  })
}

// 查询卖手详细
export function getCollege(userId) {
  return request({
    url: '/work/userseller/' + userId,
    method: 'get'
  })
}

// 新增/修改卖手
export function addCollege(data) {
  return request({
    url: '/work/userseller/saveOrUpdate',
    method: 'post',
    data: data
  })
}

// 修改卖手
export function updateCollege(data) {
  return request({
    url: '/product/college',
    method: 'put',
    data: data
  })
}

// 删除卖手
export function delCollege(userId) {
  return request({
    url: '/work/userseller/delete-by-id',
    method: 'get',
    params: {"id":userId}
  })
}

//批量删除卖手
export function delColleges(userIds) {
  const data = {
    "ids":userIds
  }
  return request({
    url: '/work/userseller/delete-by-ids',
    method: 'get',
    params: data
  })
}